<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
    <h:head>

    </h:head>

    <h:body>

        <h:form id="form">
            <p:messages id="msgs" showDetail="true">
                <p:autoUpdate />
            </p:messages>

            <!-- GitHub https://github.com/primefaces/primefaces/issues/8725 -->
            <p:autoComplete id="autocomplete" 
                            value="#{autoComplete006.driver}" 
                            converter="generatedDriverConverter"
                            completeMethod="#{autoComplete006.completeText}" 
                            var="driver" 
                            itemLabel="#{driver.name}"
                            itemValue="#{driver}" 
                            forceSelection="true" 
                            autoSelection="true" 
                            minQueryLength="1" 
                            queryDelay="10"
                            emptyMessage="no driver found" 
                            moreText="search stopped after 10 drivers" 
                            queryMode="server"
                            dynamic="true"
                            dropdown="true" />

            <p:commandButton id="button" update="@form" value="Submit" actionListener="#{autoComplete006.submit}" />
        </h:form>

    </h:body>
</f:view>

</html>